New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added some basic CLI #49
Conversation
* Date: 4/3/12 | ||
* Time: 4:38 PM | ||
* To change this template use File | Settings | File Templates. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove this and add the license header instead
protected function configure() | ||
{ | ||
$this | ||
->setName('fixtures:add') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to be consistent with the naming used in the symfony2 bundle, it should be load
, not add
.
Thus, I think the command should provide some protected method able to be overwritten to modify it. currently, you have to duplicate it entirely if you want to provide a command for MongoDB or PHPCR, and the DoctrineFixturesBundle cannot use it either to avoid duplicating the logic. |
I believe all the bundles currently have commands, correct? Is this modeled after the ORM bundle's command? The structure certainly differs from LoadDataFixturesDoctrineODMCommand. |
@jmikola yeah, currently, they all duplicate the whole command, which is why I already thought about providing a base class in the DataFixtures library (but without time to actually do it) |
Shouldn’t this command be called |
👍 |
Has there been any progress with this, whatsoever? If not, I am more than willing to take on improving this PR until it is accepted. |
It doesn't look like @lsv is working further on it since it was created in 2012. If it is okay would you like to take over? |
@SenseException I'd love to! I believe this PR will be a welcome addition. |
Command line interface (CLI)
You will need to edit a Doctrine file for this to work.
Goto
Doctrine/ORM/Tools/Console/ConsoleRunner.php
Add this
after
Now you can use
Options to fixtures:add